package cn.wolfcode.trip.base.mapper;

import cn.wolfcode.trip.base.domain.Product;
import cn.wolfcode.trip.base.query.ProductQueryObject;
import org.apache.ibatis.annotations.Param;

import javax.xml.crypto.Data;
import java.util.List;

public interface ProductMapper {
    int insert(Product record);

    int deleteByPrimaryKey(Long id);

    Product selectByPrimaryKey(Long id);

    int updateByPrimaryKey(Product record);

    List<Product> selectNewProduct();

    List<Product> selectAll();

    List<Product> selectForList(ProductQueryObject qo);

    void changeState(@Param("id") Long id,
                     @Param("state") Integer state,
                     @Param("addTime")Data addTime);

    List<Product> selectByType(Long productTypeId);
}